<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateUsersTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('users', function (Blueprint $table) {
            $table->bigIncrements('id');
            $table->string("user_number",100)->unique()->comment("登陆帐号");
            $table->string("password",100)->comment("密码");
            $table->integer("user_type")->default(0)->comment("用户类型 0普通用户 1个人 2机构 3企业");
            $table->timestamps();
            $table->softDeletes();
        });
        DB::statement("ALTER TABLE `lpw_users` comment '用户表'");
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('users');
    }
}
